# -*- coding:utf-8 -*-
# @Time: 2020/9/2 13:49
# @Author: liupengfei
# @File: urls.py

from django.urls import path
from rest_framework.routers import SimpleRouter

from .views import ProductViewSet, ProductDictViewSet, ProductParameterViewSet, RelateProductViewSet

urlpatterns = [
    path('dict/', ProductDictViewSet.as_view()),
    path('relate/', RelateProductViewSet.as_view())  # 关联产品列表
]

router = SimpleRouter()
router.register('parameter', ProductParameterViewSet)  # ProductParameter,CRUD操作
router.register('', ProductViewSet)  # 后台Product,CRUD操作
urlpatterns += router.urls
